# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-configupdater
pkgver=3.1.1
_commit=0539c207ac57ea4fa6a64618e41b987c5865ffd9
pkgrel=3
pkgdesc="Parser like ConfigParser but for updating configuration files"
url="https://github.com/pyscaffold/configupdater"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('git' 'python-setuptools-scm')
checkdepends=('python-pytest-cov')
source=("git+https://github.com/pyscaffold/configupdater.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd configupdater
  python setup.py build
}

check() {
  cd configupdater
  PYTHONPATH="$PWD"/build/lib pytest
}

package() {
  cd configupdater
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
}
